{template header}
<script>
$(document).ready(function() {

//选择一级区域
$('#oneid').change(function(){
	$("#stwoid").html('<img src="'+siteUrl+'public/images/loading.gif" />');
	var oneid = $(this).children('option:selected').val();  //弹出select的值
	
	if(oneid==0){
		$("#stwoid").html('');
		$("#sthreeid").html('');
	}else{
		$("#sthreeid").html('');
		$.ajax({
			type: "GET",
			url:  "{SITE_URL}index.php?app=user&ac=area&ts=two&oneid="+oneid,
			success: function(msg){
				$("#stwoid").html(msg);
				
				//选择二级区域
				$('#twoid').change(function(){
					$("#sthreeid").html('<img src="'+siteUrl+'public/images/loading.gif" />');
					var twoid = $(this).children('option:selected').val();  //弹出select的值
					
					if(twoid == 0){
						$("#sthreeid").html('');
					}else{
					
						//ajax
						$.ajax({
							type: "GET",
							url:  "{SITE_URL}index.php?app=user&ac=area&ts=three&twoid="+twoid,
							success: function(msg){
								$('#sthreeid').html(msg);
							}
						});
					
					}

				});
				
			}
		});
	
	}
	
});

});
</script>

<!--main-->
<div class="midder">
<div class="mc">
{template set_menu}

<div class="utable">
<table cellpadding="5" cellspacing="5">
<tr>
<th>常居地：</th>
<td>
<!--{if $strArea}-->
{$strArea[one][areaname]} 
{$strArea[two][areaname]} 
{$strArea[three][areaname]} 
<!--{else}-->
火星
<!--{/if}-->
</td>
</tr>

<tr>
<th valign="top">修改常居地：</th>
<td>
<form method="POST" action="{SITE_URL}index.php?app=user&ac=do&ts=setcity">
<select id="oneid" name="oneid">
<option value="0">请选择</option>
<!--{loop $arrOne $key $item}-->
<option value="{$item[areaid]}">{$item[areaname]}</option>
<!--{/loop}-->
</select>
<span id="stwoid"></span>
<span id="sthreeid"></span>
<br />
<br />
<input class="submit" type="submit" value="修改"  />
</form>
</td>
</tr>

</table>
</div>
</div>
</div>
{template footer}